package com.common.util;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

public class PathUtils {
	
	public static String getBasePath(HttpServletRequest request) {
		String path = request.getContextPath();
		String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
		return basePath;
	}
	
	public static Map<String, Object> getModelMap() {
		Map<String, Object> modelMap = new HashMap<String, Object>();
		return modelMap;
	}
	
	public static Map<String, Object> getBaseModelMap(String path) {
		Map<String, Object> modelMap = new HashMap<String, Object>();
		modelMap.put("base", path);
		return modelMap;
	}
	
}
